home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0294.ZIP
/
M_DETERM.C
< prev
next >
Wrap
C/C++ Source or Header
|
1985-05-18
|
4KB
|
20 lines
static char *sccsid = "@(#)m_determinant.c 4/5/82 (U of Maryland, FLB)";
#include "mat.h"
double
m_determinant(mat)
register struct matrix *mat;
{
register int col;
double det = 0.0;
if (mat->m_rows == 1)
return(m_v(mat, 0, 0));
for (col = 0; col < mat->m_cols; col++)
det += m_v(mat, 0, col) * m_cofactor(mat, 0, col);
return(det);
}